    //(2).在ad_lr.js中编写代码实现对联广告，
    //先定义几个广告参数，便于灵活使用，比如广告
    //的宽、高、图片等。
    var ad_width="100px";
    var ad_height="250px";
    var ad_img="img/ad1.jpg";
    var close_img="img/close.png";
    var ad_img2="img/ad2.jpg";
    //199000749许业娜
    //(3).创建广告容器的div
    //左侧
    var ad_left=document.createElement("div");
    ad_left.style.width=ad_width;
    ad_left.style.height=ad_height;
    ad_left.style.padding="0px";
    ad_left.style.position="absolute";
    ad_left.style.left="30px";
    ad_left.style.top="20px";

    //右侧
    var ad_right=document.createElement("div");
    ad_right.style.width=ad_width;
    ad_right.style.height=ad_height;
    ad_right.style.padding="0px";
    ad_right.style.position="absolute";
    ad_right.style.right="30px";
    ad_right.style.top="20px";

    //199000749许业娜
    //(4).创建img元素，并加入到ad_left中，作为广告图片
    //左侧
    var adimg=document.createElement("img");
    adimg.src=ad_img;
    ad_left.appendChild(adimg);
    //右侧
    var adimg=document.createElement("img");
    adimg.src=ad_img;
    ad_right.appendChild(adimg);

    //(5).创建关闭按钮，并加入到ad_left中
    var closeimg=document.createElement("img");
    closeimg.src=close_img;
    closeimg.style.width="50px";
    closeimg.style.position="relative";
    closeimg.style.left="50px";
    closeimg.style.top="-20px";
    closeimg.style.cursor="pointer";
    ad_left.appendChild(closeimg);
    //右侧
    var closeimg=document.createElement("img");
    closeimg.src=close_img;
    closeimg.style.width="50px";
    closeimg.style.position="relative";
    closeimg.style.right="50px";
    closeimg.style.top="-20px";
    closeimg.style.cursor="pointer";
    ad_right.appendChild(closeimg);

    //(6).将ad_left添加到html中
    //左侧
    document.documentElement.appendChild(ad_left);
    //右侧
    document.documentElement.appendChild(ad_right);

    //(7).注册事件，实现关闭广告功能
    //左侧
    ad_left.addEventListener("click",function(){
        this.style.display="none";
    });

    //右侧
    ad_right.addEventListener("click",function(){
        this.style.display="none";
    });

    // (8).编写代码，实现对联广告随滚动条移动。
    //左侧
    window.addEventListener("scroll",function(){
        var st1=document.documentElement.scrollTop||document.body.scrollTop;
        ad_left.style.top=(st1+20)+"px";
        ad_right.style.top=(st1+20)+"px";
    });

    //199000749许业娜
    //右下角的广告
    // 创建广告容器的div
    var ad_rightdown=document.createElement("div");
    ad_rightdown.style.width=ad_width;
    ad_rightdown.style.height=ad_height;
    ad_rightdown.style.padding="0px";
    ad_rightdown.style.position="absolute";
    ad_rightdown.style.right="205px";
    ad_rightdown.style.bottom="60px";

    //创建img元素
    var adimg2=document.createElement("img");
    adimg2.src=ad_img2;
    ad_rightdown.appendChild(adimg2);

    //建删除按钮
    var closeimg2=document.createElement("img");
    closeimg2.src=close_img;
    closeimg2.style.width="50px";
    closeimg2.style.position="relative";
    closeimg2.style.right="0px";
    closeimg2.style.bottom="20px";
    closeimg2.style.cursor="pointer";
    ad_rightdown.appendChild(closeimg2);
    document.documentElement.appendChild(ad_rightdown);

    //注册事件，实现关闭广告功能
    ad_rightdown.addEventListener("click",function(){
        this.style.display="none";
    });
    //实现广告随滚动条移动
    window.addEventListener("scroll",function(){
        var st2=document.documentElement.scrollTop || document.body.scrollTop;
        ad_rightdown.style.top= (st2+456)+"px";
})

    